Skip to content

Fix WorldBank urls and outdated data usage#1292

Open
spjuhel wants to merge 19 commits into
developfrom
fix-worldbank-urls
Open

Fix WorldBank urls and outdated data usage#1292
spjuhel wants to merge 19 commits into
developfrom
fix-worldbank-urls

Conversation

@spjuhel
Copy link
Copy Markdown
Collaborator

@spjuhel spjuhel commented May 15, 2026

Changes proposed in this PR:

  • Remove the broken WORLD_BANK_WEALTH_ACC URL constant and FILE_WORLD_BANK_WEALTH_ACC filename constant
  • Rewrite world_bank_wealth_account to fetch data via download_world_bank_indicator instead of downloading and unzipping a CSV file; interpolation/extrapolation logic and the no_land correction are unchanged
  • Remove now-unused imports: zipfile, Path
  • Update docstring year range for world_bank_wealth_account from 1995–2014 to 1995–2020 to reflect the current dataset coverage
  • Update docstring and documentation to reflect change to 2019 real chained USD (from constant 2014)
  • Update test values to reflect changes

This PR fixes #1291 and #1293

PR Author Checklist

PR Reviewer Checklist

spjuhel and others added 15 commits May 15, 2026 11:19
* Fix TCTracks.from_FAST duplicate loading from year loop

* Refactor test_from_FAST: extend fixture to 2 years, remove separate regression test

The test fixture FAST_test_tracks.nc now has year=[2025,2026] (only
seeds_per_month is extended; track variables retain their n_trk dim).
The existing len(tc_track.data)==5 assertion now acts as the regression
check: the buggy year-loop code would return 5x2=10 tracks.

The separate test_from_FAST_not_multiplied_by_year_dim (with its
temporary-file scaffolding) is removed.

* Update changelo

---------

Co-authored-by: Simona Meiler <simona.meiler@usys.ethz.ch>
Co-authored-by: Chahan Kropf <chahan.kropf@posteo.com>
@spjuhel spjuhel changed the title Fix worldbank urls Fix WorldBank urls and outdated data usage May 15, 2026
@spjuhel spjuhel marked this pull request as ready for review May 15, 2026 12:56
@spjuhel
Copy link
Copy Markdown
Collaborator Author

spjuhel commented May 15, 2026

@emanuel-schmid or @peanutfun, this should be a quick one to review. And will fix some of the currently failing tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WORLD_BANK_INC_GRP url is deprecated world_bank_wealth_account fails with an SSL certificate error

3 participants